package com.hnnou.freshmenappserver.dao;

import com.hnnou.freshmenappserver.bean.SchoolSwiper;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface SchoolSwiperDao {
    @Select("select * from t_schoolswiper")
    List<SchoolSwiper> findAll();
    @Delete("delete from t_schoolswiper where id=#{id}")
    int deleteById(int id);
    @Update("update t_schoolswiper set name=#{name} ,icon=#{icon}" +
            " where id=#{id}")
    int update(SchoolSwiper schoolswiper);
    @Insert("insert into t_schoolswiper(name,icon)"+
            " values(#{title},#{content},#{date})")
    int insert(SchoolSwiper schoolswiper);

    @Select("select * from t_schoolswiper where id=#{id}")
    SchoolSwiper selectById(int id);

    @Select("select * from t_schoolswiper where id=#{id}")
    List<SchoolSwiper> findById(Integer id);

}
